/**
 * @HTML ScheduleTable.html
 * @Title 排期表
 */
//查询未设置节点制单
var ScheduleTable0_left = "SELECT qty.id,qty.mpsid,qty.code,qty.colorid,qty.color,qty.allqty,qty.delivery_date AS deliveryDate,qty.is_order AS isOrder,qty.is_schedule AS isSchedule,qty.creation_name AS creationName,qty.creation_date AS creationDate,qty.update_date AS updateDate,qty.version,qty.company_id AS companyId,mps.short_name AS shortName FROM er_mps_qty qty LEFT JOIN er_mps mps ON qty.mpsid=mps.offerid AND qty.code=mps.code WHERE qty.is_schedule=0 and mps.is_order=0";
//查询未设置节点PLM
var ScheduleTable1_left = "SELECT qty.id,qty.mpsid,qty.code,qty.colorid,qty.color,qty.allqty,qty.delivery_date AS deliveryDate,qty.is_order AS isOrder,qty.is_schedule AS isSchedule,qty.creation_name AS creationName,qty.creation_date AS creationDate,qty.update_date AS updateDate,qty.version,qty.company_id AS companyId,mps.short_name AS shortName FROM er_mps_qty qty LEFT JOIN er_mps mps ON qty.mpsid=mps.mpsid AND qty.code=mps.code WHERE qty.is_schedule=0 and mps.is_order=1";
//查询未设置节点订单
var ScheduleTable2_left = "SELECT qty.id,qty.mpsid,qty.code,qty.colorid,qty.color,qty.allqty,qty.delivery_date AS deliveryDate,qty.is_order AS isOrder,qty.is_schedule AS isSchedule,qty.creation_name AS creationName,qty.creation_date AS creationDate,qty.update_date AS updateDate,qty.version,qty.company_id AS companyId,mps.short_name AS shortName FROM er_mps_qty qty LEFT JOIN er_mps mps ON qty.mpsid=mps.offerid AND qty.code=mps.code WHERE qty.is_schedule=0 and mps.is_order=2";


/**
 * @HTML OutgrowthMPSID.html
 * @Title 外发管理
 */
//查询未结案的制单
var OutgrowthMPSID_selMC = "SELECT mpsid,code from er_mps where state='' Group By mpsid,code"

/**
 * 查询合作商档案SQL
 */
var select_customer = "SELECT customerid,parent_id AS parentId,customer_name AS customerName,short_name AS shortName,address,link_name AS linkName,link_name_tel AS linkNameTel,brand_name AS brandName,creation_name AS creationName,creation_date AS creationDate,version,update_date AS updateDate,company_id AS companyId FROM er_customer WHERE parent_id NOT IN(SELECT customerid FROM er_customer WHERE customer_name LIKE '%客户%') AND customer_name NOT LIKE '%客户%'"





//